import request from "@/axios/axios.ts";
import {HandleFuzzySearch, HandleCRUD, HandleUse} from "./type.ts";

enum API1 {
    A = '/inventory/handle_crud',
    C = '/inventory/handle_deactivation_and_activation',
    B = '/inventory/handle_fuzzy_search',
}
// 处理方 增删改查
export const reqHandleCRUD = (data: HandleCRUD): Promise<any> => {
    return request.post<any, any>(API1.A, data)
}

// 处理方 模糊搜索
export const reqHandleFuzzySearch = (data: HandleFuzzySearch): Promise<any> => {
    return request.post<any, any>(API1.B, data)
}

// 处理方 停用和启用
export const req_handle_deactivation_and_activation = (data: HandleUse): Promise<any> => {
    return request.post<any, any>(API1.C, data)
}
